﻿namespace TSharp.Core.AppBox
{
    /// <summary>
    /// 区域名称常量
    /// <para>2010/9/20</para>
    /// 	<para>TANGJINGBO</para>
    /// 	<author>tangjingbo</author>
    /// </summary>
    public struct AreaConst
    {
        /// <summary>
        /// 默认区域
        /// </summary>
        public static string Default = "";
        /// <summary>
        /// 系统管理域
        /// </summary>
        public static string Admin = "admin";
        /// <summary>
        /// 作业调度域
        /// </summary>
        public static string Scheduler = "scheduler";

        /// <summary>
        /// Areas the path.
        /// </summary>
        /// <param name="areaName">Name of the area.</param>
        /// <returns></returns>
        public static string Path(string areaName)
        {
            if (string.IsNullOrEmpty(areaName))
                return "~/";
            return string.Format("~/areas/{0}/", areaName);
        }
    }
}